<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function (\Modules\Admin\Service\ModuleService $moduleService) {
    //获取当前后台设置的默认模块
    $module=$moduleService->getDefault();
    $class = '\Modules\\'.$module['name'].'\Http\Controllers\HomeController';
    //访问后台设置的默认模块
    return app()->build($class)->index();
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
//上传图片路由，这里面使用any
Route::any('/upload','UploadController@upload');
//编辑器上传图片处理
Route::any('/upload-simditor','UploadController@bianjiqiupload');
